#include <stdio.h>
#include "util_crc32.h"

/* 多段校验和一次校验结果比较 */
const char buff1[4] = {'1', '2', '3', '4'};
const char buff2[4] = {'5', '6', '7', '8'};
const char buff3[8] = {'1', '2', '3', '4', '5', '6', '7', '8'};

int main()
{
    uint32_t ret = UtilCrc32(buff1, sizeof(buff1));
    ret = UtilCrc32(buff2, sizeof(buff2), ret);
    /* 多段校验结果 */
    printf("result1: %08X \r\n", ret);
    /* 一次校验结果 */
    printf("result2: %08X \r\n", UtilCrc32(buff3, sizeof(buff3)));

    return 0;
}
